<?php


$config = file_get_contents('./config.json');
$config = json_decode($config, true);

echo 'exec filter log' . PHP_EOL;

exec("nohup tail -f {$config['log_file']} | grep ' 404 ' >> {$config['filter_file']} 2>&1 &");

exec("sh iptables.sh {$config['filter_file']} {$config['tmp_div']} {$config['white_file']}");